﻿<%@ Page Language="C#"  MasterPageFile="~/MasterPage.master" AutoEventWireup="true" Inherits="Nivdal.ManageStadium" Title="" StylesheetTheme="SkinFile" Codebehind="ManageStadium.aspx.cs" %>


<asp:Content ID="PageNameContent" ContentPlaceHolderID="PageNamePlaceHolder" runat="server">
    <asp:Label ID="PageNameLabel" runat="server" Text="<%$ Resources:Resource, ManageStadium_PageNameLabel %>" CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:HiddenField ID="StadiumIdHiddenField" runat="server" />
    <asp:Panel ID="MessagePanel" runat="server">
        <div class="basic_element padding5">
            <asp:Label ID="MessageLabel" runat="server" SkinID="GridLabel"></asp:Label>
        </div>
    </asp:Panel>
    <div class="basic_element">
    
    <asp:FormView ID="TicketsCostFormView" runat="server" DataSourceID="StadiumSQLDataSource" Width="100%" DefaultMode="Edit">
        <ItemTemplate>
        </ItemTemplate>
        <EditItemTemplate>
                <div class="red_title">
                    <asp:Hyperlink ID="StadiumNameLabel" runat="server" CssClass="white_title" Text='<%# Eval("StadiumName") %>' NavigateUrl="~/StadiumPage.aspx"></asp:Hyperlink>
            
                </div>
                <div class="padding5">
                 <asp:Label ID="TicketsCostTitleLabel" runat="server" Text="<%$ Resources:Resource, ManageStadium_TicketsCostTitleLabel %>" SkinID="InfoLabel"></asp:Label>
                 <br />
                <table style="width: 70%;" cellpadding="15">
                    <tr>
                        <td>
                            <asp:Label ID="BasicTitleLabel" runat="server" Text="<%$ Resources:Resource, Global_Basic %>" SkinID="InfoLabel"></asp:Label><br />
                            <asp:DropDownList ID="BasicDropDownList" runat="server" AppendDataBoundItems="true" SelectedValue='<%# Bind("Basic") %>'>
                            
                                <asp:ListItem>5</asp:ListItem>
                                <asp:ListItem>6</asp:ListItem>
                                <asp:ListItem>7</asp:ListItem>
                                <asp:ListItem>8</asp:ListItem>
                                <asp:ListItem>9</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td>
                            <asp:Label ID="UnderRoofLabel" runat="server" Text="<%$ Resources:Resource, Global_UnderRoof %>" SkinID="InfoLabel"></asp:Label><br />
                            <asp:DropDownList ID="UnderRoofDropDownList" runat="server" AppendDataBoundItems="true" SelectedValue='<%# Bind("UnderRoof") %>'>
                            
                                <asp:ListItem>7</asp:ListItem>
                                <asp:ListItem>8</asp:ListItem>
                                <asp:ListItem>9</asp:ListItem>
                                <asp:ListItem>10</asp:ListItem>
                                <asp:ListItem>11</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td>
                            <asp:Label ID="VipLabel" runat="server" Text="<%$ Resources:Resource, ManageStadium_VipLabel %>" SkinID="InfoLabel"> </asp:Label><br />
                            <asp:DropDownList ID="VIPDropDownList" runat="server" AppendDataBoundItems="true" SelectedValue='<%# Bind("VIP") %>'>
                            
                                <asp:ListItem>13</asp:ListItem>
                                <asp:ListItem>14</asp:ListItem>
                                <asp:ListItem>15</asp:ListItem>
                                <asp:ListItem>16</asp:ListItem>
                                <asp:ListItem>17</asp:ListItem>
                                <asp:ListItem>18</asp:ListItem>
                                <asp:ListItem>19</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td style="vertical-align:bottom;">
                            <asp:Button ID="TicketsCostSubmitButton" runat="server" Text="<%$ Resources:Resource, Global_Submit %>" CssClass="GreenSmallButtonStyle" CommandName="Update" />                           
                        </td>
                    </tr>
                </table>   
            </div> 
        </EditItemTemplate>
    </asp:FormView>
    
    
    <asp:SqlDataSource ID="StadiumSQLDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
       SelectCommand="Nivdal_StadiumShowTicketsCost" SelectCommandType="StoredProcedure" 
       UpdateCommand="Nivdal_StadiumSetTicketsCost" UpdateCommandType="StoredProcedure">
        <UpdateParameters>
            <asp:Parameter Name="Basic" DbType="Decimal" />
            <asp:Parameter Name="UnderRoof" DbType="Decimal" />
            <asp:Parameter Name="VIP" DbType="Decimal" />
            <asp:ControlParameter ControlID="StadiumIdHiddenField" PropertyName="Value" Name="StadiumId" DbType="Decimal" />
        </UpdateParameters>    
    </asp:SqlDataSource>
    
    </div>
    <div class="basic_element">
    <div class="red_title">
        <asp:Label ID="ChangeStadiumNameTitleLabel" runat="server" 
            Text="<%$ Resources:Resource, ManageStadium_ChangeStadiumNameTitleLabel %>" CssClass="white_title" ></asp:Label>
    </div>
    <div class="padding5">
        <asp:TextBox ID="StadiumNameTextBox" runat="server" MaxLength="128" Width="200"></asp:TextBox>
        &nbsp;&nbsp;&nbsp;
        <asp:Button ID="ChangeNameButton" runat="server" Text="<%$ Resources:Resource, ManageStadium_ChangeNameButton %>" 
            message="<%$ Resources:Resource, ManageStadium_ChangeNameButton_ClickQuestion %>"
            OnClientClick='return confirm(this.getAttribute("message"))' 
            onclick="ChangeNameButton_Click" CssClass="GreenSmallButtonStyle" />
    
        <br />
        <asp:Label ID="StadiumNameMessageLabel" runat="server" Text="" SkinID="GreenSmallHeaderLabel"></asp:Label>
    </div>
    </div>
    
    <div class="basic_element">
    <div class="red_title">
        <asp:Label ID="BuilldMoreTitleLabel" runat="server" Text="<%$ Resources:Resource, ManageStadium_UpdateSeatsQuantityLabel %>" CssClass="white_title"></asp:Label>
    </div>
    <div class="padding5">
        <table style="width:100%">
            <tr>
                <td style="width:30%;">
                    <asp:FormView ID="UpgradeStadiumFormView" runat="server" 
                        DataSourceID="UpgradeStadiumSqlDataSource">
                        <ItemTemplate>
                            <asp:Label ID="BasicSeatsLabel" runat="server" Text='<% $ Resources:Resource, Global_BasicSeats %>' SkinID="InfoLabel"></asp:Label>
                            <asp:Label ID="Label2" runat="server" Text='<%# Eval("[BasicSeats]") %>' SkinID="SmallHeaderLabel" />
                            <br />
                            <asp:Label ID="UnderRoofSeatsLabel" runat="server" Text="<%$ Resources:Resource, ManageStadium_UnderRoofSeatsLabel %>" SkinID="InfoLabel"></asp:Label>
                            <asp:Label ID="Label5" runat="server" Text='<%# Eval("[UnderRoofSeats]") %>' SkinID="SmallHeaderLabel" />
                            <br />
                            <asp:Label ID="VipSeatsLabel" runat="server" Text="<%$ Resources:Resource, ManageStadium_VipSeatsLabel %>" SkinID="InfoLabel"></asp:Label>
                            <asp:Label ID="LogoLabel" runat="server" Text='<%# Bind("VipSeats") %>' SkinID="SmallHeaderLabel" />
                        </ItemTemplate>
                    </asp:FormView>
                    <asp:SqlDataSource ID="UpgradeStadiumSqlDataSource" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                        SelectCommand="Nivdal_StadiumGetSeatNumbers" SelectCommandType="StoredProcedure">
                    </asp:SqlDataSource>
                </td>   
                <td>
                    <asp:FormView ID="UnderConstructionFormView" runat="server" DataSourceID="UnderConstructionSqlDataSource">
                        <ItemTemplate>
                            <asp:Label ID="UnderConstructionTitleLabel" runat="server" Text="<%$ Resources:Resource, ManageStadium_UnderConstructionTitleLabel %>" SkinID="InfoLabel"></asp:Label>
                            <br />
                            <asp:Label ID="BasicSeatsonstructionTitleLabel" runat="server" Text='<%# Resources.Resource.Global_BasicSeats + ":"%>' SkinID="InfoLabel"></asp:Label>
                            <asp:Label ID="BasicSeatsonstructionLabel" runat="server" Text='<%# Eval("Basic") %>' SkinID="GridLabel"></asp:Label>
                            <br />
                            <asp:Label ID="UnderRoofConstructionTitleLabel" runat="server" Text='<%# Resources.Resource.Global_UnderRoof+ ":"%>' SkinID="InfoLabel"></asp:Label>
                            <asp:Label ID="UnderRoofConstructionLabel" runat="server" Text='<%# Eval("UnderRoof") %>' SkinID="GridLabel"></asp:Label>
                            <br />
                            <asp:Label ID="VipConstructionTitleLabel" runat="server" Text="<%$ Resources:Resource, ManageStadium_VipConstructionTitleLabel %>" SkinID="InfoLabel"></asp:Label>
                            <asp:Label ID="VipConstructionLabel" runat="server" Text='<%# Eval("Vip") %>' SkinID="GridLabel"></asp:Label>
                            <br />
                            <asp:Label ID="ConstructionExpectationTitleLabel" runat="server" Text="<%$ Resources:Resource, ManageStadium_ConstructionExpectationTitleLabel %>" SkinID="InfoLabel"></asp:Label>
                            <asp:Label ID="ConstructionExpectationLabel" runat="server" Text='<%# FormatDate(Eval("CompletionDate")) %>' SkinID="GridLabel"></asp:Label>
                        </ItemTemplate>
                    </asp:FormView>
                    <asp:SqlDataSource ID="UnderConstructionSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                        SelectCommand="Nivdal_GetStadiumConstructionDetails" SelectCommandType="StoredProcedure">
                    </asp:SqlDataSource>            
                </td>
            </tr>
        </table>
    
    
        <asp:Panel ID="UpdateSeatsQuantityPanel" runat="server">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                                                                                                                                                                                                                                                                                                                                                                                                            <ContentTemplate>
        <br />

        <asp:FormView ID="TicketsCostsFormview" runat="server" DataSourceID="BuidCostsDataSource">
        <ItemTemplate>
            <asp:Label ID="CostsTitleLabel" runat="server" SkinID="SubHeaderLabel" Text="<%$ Resources:Resource, ManageStadium_BuidCostsTitle %>"></asp:Label>
            <br />
            <table cellpadding="3">
            <tr>
            <td>
                <asp:Label ID="BasicSeatsTitleLabel" runat="server" Text="<%$ Resources:Resource, Global_Basic %>" SkinID="InfoLabel"></asp:Label>
            </td>
            <td>
                <asp:Label ID="BasicCostsLabel" runat="server" Text='<%# Eval("Basic") %>' SkinID="GridLabel"></asp:Label>
                <asp:Image ID="AtuksImage1" runat="server" ImageUrl="~/Images/Icons/atuk.png" ToolTip="<%$ Resources:Resource, Atuks %>" />
            </td>
            </tr>
            <tr>
            <td>
                <asp:Label ID="UnderRoofTitleLabel" runat="server" Text="<%$ Resources:Resource, Global_UnderRoof %>" SkinID="InfoLabel"></asp:Label>
            </td>
            <td>
                <asp:Label ID="UnderRoofCostsLabel" runat="server" Text='<%# Eval("UnderRoof") %>' SkinID="GridLabel"></asp:Label>
                <asp:Image ID="AtuksImage2" runat="server" ImageUrl="~/Images/Icons/atuk.png" ToolTip="<%$ Resources:Resource, Atuks %>" />
            </td>
            </tr>
            <tr>
            <td>
                <asp:Label ID="VIPTitlelabel" runat="server" Text="<%$ Resources:Resource, ManageStadium_VipSeatsTitleLabel %>" SkinID="InfoLabel"></asp:Label>
            </td>
            <td>
                <asp:Label ID="VIPCostsLabel" runat="server" Text='<%# Eval("VIP") %>' SkinID="GridLabel"></asp:Label>
                <asp:Image ID="AtuksImage3" runat="server" ImageUrl="~/Images/Icons/atuk.png" ToolTip="<%$ Resources:Resource, Atuks %>" />
            </td>
            </tr>
            <tr>
            <td>
                <asp:Label ID="OneTimeTitleLabel" runat="server" Text="<%$ Resources:Resource, ManageStadium_BuildCostOneTimeConstructionCost %>" SkinID="InfoLabel"></asp:Label>
            </td>
            <td>
                <asp:Label ID="OneTimeCostsLabel" runat="server" Text='<%# GetNivdalData.GetNivdalData.FormattedNumber(Eval("OneTime")) %>' SkinID="GridLabel"></asp:Label>
                <%--<asp:Label ID="OneTimeCostsLabel" runat="server" Text='<%# Eval("OneTime") %>' SkinID="GridLabel"></asp:Label>--%>
                <asp:Image ID="AtuksImage4" runat="server" ImageUrl="~/Images/Icons/atuk.png" ToolTip="<%$ Resources:Resource, Atuks %>" />
            </td>
            </tr>
            </table>        
        </ItemTemplate>
        </asp:FormView>
        <asp:SqlDataSource ID="BuidCostsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="Nivdal_StadiumShowConstructionsCosts" SelectCommandType="StoredProcedure">   
        </asp:SqlDataSource>
        <br /><br />
        <asp:Label ID="UpdateSeatsQuantityLabel" runat="server" Text="<%$ Resources:Resource, ManageStadium_UpdateSeatsQuantityLabel %>" SkinID="SubHeaderLabel"></asp:Label>
        <br />
        <table style="width: 100%;">
            <tr>
                <td>
                    <asp:Label ID="BasicSeatsTitleLabel" runat="server" Text="<%$ Resources:Resource, Global_Basic %>" SkinID="InfoLabel"></asp:Label>
                    <br /> 
                    <asp:TextBox ID="BasicSeatsTextBox" runat="server" MaxLength="6" 
                         ValidationGroup="StadiumUpgrade" Width="70px"></asp:TextBox>
                    <asp:RegularExpressionValidator  runat="server" ID="RegularExpressionValidator1"  
                     ControlToValidate="BasicSeatsTextBox" ErrorMessage="Illigal value" 
                     ValidationExpression="^[0-9]{1,6}$"
                     ValidationGroup="StadiumUpgrade"></asp:RegularExpressionValidator>
                </td>
                <td>
                    <asp:Label ID="UnderRoofSeatsTitleLabel" runat="server" Text="<%$ Resources:Resource, Global_UnderRoof %>" SkinID="InfoLabel"></asp:Label>
                    <br />
                    <asp:TextBox ID="UnderRoofSeatsTextBox" runat="server" MaxLength="6" 
                         ValidationGroup="StadiumUpgrade" Width="70px"></asp:TextBox>
                         
                    <asp:RegularExpressionValidator  runat="server" ID="RegularExpressionValidator2"  
                     ControlToValidate="UnderRoofSeatsTextBox" ErrorMessage="Illigal value" 
                     ValidationExpression="^[0-9]{1,6}$"
                     ValidationGroup="StadiumUpgrade"></asp:RegularExpressionValidator>
                </td>
                <td>
                     <asp:Label ID="VipSeatsTitleLabel" runat="server" Text="<%$ Resources:Resource, ManageStadium_VipSeatsTitleLabel %>" SkinID="InfoLabel"> </asp:Label>
                     <br />
                     <asp:TextBox ID="VipSeatsTextBox" runat="server" MaxLength="6" 
                         ValidationGroup="StadiumUpgrade" Width="70px"></asp:TextBox>
                     <asp:RegularExpressionValidator  runat="server" ID="RegularExpressionValidator3"  
                        ControlToValidate="VipSeatsTextBox" ErrorMessage="Illigal value" 
                        ValidationExpression="^[0-9]{1,6}$"
                        ValidationGroup="StadiumUpgrade"></asp:RegularExpressionValidator>
                </td>
            </tr>            
        </table>
        <asp:Label ID="ShowConstructionCostLabel" runat="server" SkinID="InfoLabel"></asp:Label>
        <br /> 
        <asp:Button ID="CalculateConstructionCostButton" runat="server" 
            Text="<%$ Resources:Resource, Global_Calculate %>"  ValidationGroup="StadiumUpgrade" ToolTip="<%$ Resources:Resource, ManageStadium_CalculateConstructionCostButtonToolTip %>"
            onclick="CalculateConstructionCostButton_Click" CssClass="GreySmallButtonStyle" />
        <asp:Button ID="UpradeButton" runat="server" Text="<%$ Resources:Resource, Global_Upgrade %>" OnClientClick='<%# UpradeButtonClick() %>' Visible = "false" 
            onclick="UpradeButton_Click" CssClass="GreenSmallButtonStyle" />
            &nbsp; &nbsp;
        <asp:LinkButton ID="ChangeSeatsValuesHyperLink" runat="server" Text="<%$ Resources:Resource, Global_ChangeSeatsValues %>" SkinID="TitleLink" Visible="false" OnClick="ChangeSeatsValuesClck"> </asp:LinkButton>
    </ContentTemplate>
        </asp:UpdatePanel>
        </asp:Panel>
    </div>
    </div>
</asp:Content>


